package com.cedifie.lendapp.config

import com.cedifie.lendapp.utils.helper.SharedHelper

/**
 * Cedifie
 * @Author wwdeng
 * @CreateTime: 2024/6/12 19:25
 * @Annotation：APP 配置文件
 */
object CedConfigs {

    /**
     * APP 名称
     */
    const val CED_APPNAME = "CEDICASH"

    /**
     * 包名
     */
    const val CED_PACKAGENANME = "com.Cedicash.financementrapide.borrowapp"

    /**
     * 协议地址
     */
    const val CED_PRIVACY_POLICY_LINK = "https://sites.google.com/view/yamokesh-sites"

    /**
     * 加解密
     */
    const val CED_AES_KEY = "unkJEutW5qX7U1Qb"
    const val CED_AES_IV = "xDEej4rC6SgexgEH"


    /**
     * 是否是法语地区
     *  desc：地区转发（timeZone） 以 fcfa、xaf、senegal 结尾，则定义为法语地区
     */
    fun isFrench(): Boolean{
        val timeZone = SharedHelper.getCedSPString(SharedHelper.CED_SPKEY.CEDIFIE_TIMEZONE)
        return timeZone.endsWith("fcfa") || timeZone.endsWith("xaf") || timeZone.endsWith("senegal")
    }

    /**
     * 加纳 233
     */
    fun isGha(): Boolean{
        val timeZone = SharedHelper.getCedSPString(SharedHelper.CED_SPKEY.CEDIFIE_TIMEZONE)
        return timeZone.endsWith("gha")
    }

    /**
     * 肯尼亚 254
     */
    fun isKsh(): Boolean{
        val timeZone = SharedHelper.getCedSPString(SharedHelper.CED_SPKEY.CEDIFIE_TIMEZONE)
        return timeZone.endsWith("ksh")
    }

    /**
     * 乌干达 256
     */
    fun isUgx(): Boolean{
        val timeZone = SharedHelper.getCedSPString(SharedHelper.CED_SPKEY.CEDIFIE_TIMEZONE)
        return timeZone.endsWith("ugx")
    }

    /**
     * 科特迪瓦 225
     */
    fun isFcfa(): Boolean{
        val timeZone = SharedHelper.getCedSPString(SharedHelper.CED_SPKEY.CEDIFIE_TIMEZONE)
        return timeZone.endsWith("fcfa")
    }

    /**
     * 喀麦隆  237
     */
    fun isXaf(): Boolean{
        val timeZone = SharedHelper.getCedSPString(SharedHelper.CED_SPKEY.CEDIFIE_TIMEZONE)
        return timeZone.endsWith("xaf")
    }

    /**
     * 赞比亚 	260
     */
    fun isZmb(): Boolean{
        val timeZone = SharedHelper.getCedSPString(SharedHelper.CED_SPKEY.CEDIFIE_TIMEZONE)
        return timeZone.endsWith("zmb")
    }

    /**
     * 塞内加尔  221
     */
    fun isSenegal(): Boolean{
        val timeZone = SharedHelper.getCedSPString(SharedHelper.CED_SPKEY.CEDIFIE_TIMEZONE)
        return timeZone.endsWith("senegal")
    }

    /**
     * 坦桑尼亚  255
     */
    fun isTanz(): Boolean{
        val timeZone = SharedHelper.getCedSPString(SharedHelper.CED_SPKEY.CEDIFIE_TIMEZONE)
        return timeZone.endsWith("tanz")
    }

}